package com.mars.push.core.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author mjy
 * @date 2021-03-05
 */
@Component
@ConfigurationProperties(prefix = "push")
public class PushConfig {
    /**
     * 华为推送配置
     */
    private HuaweiConfig huawei = new HuaweiConfig();
    /**
     * oppo推送配置
     */
    private OppoConfig oppo = new OppoConfig();
    /**
     * vivo 推送配置
     */
    private VivoConfig vivo = new VivoConfig();
    /**
     * 小米推送配置
     */
    private XiaomiConfig xiaomi = new XiaomiConfig();
    /**
     * ios推送配置
     */
    private IosConfig ios = new IosConfig();

    public HuaweiConfig getHuawei() {
        return huawei;
    }

    public void setHuawei(HuaweiConfig huawei) {
        this.huawei = huawei;
    }

    public OppoConfig getOppo() {
        return oppo;
    }

    public void setOppo(OppoConfig oppo) {
        this.oppo = oppo;
    }

    public VivoConfig getVivo() {
        return vivo;
    }

    public void setVivo(VivoConfig vivo) {
        this.vivo = vivo;
    }

    public XiaomiConfig getXiaomi() {
        return xiaomi;
    }

    public void setXiaomi(XiaomiConfig xiaomi) {
        this.xiaomi = xiaomi;
    }

    public IosConfig getIos() {
        return ios;
    }

    public void setIos(IosConfig ios) {
        this.ios = ios;
    }

    public class IosConfig {

        private String certPassword;

        private String certFile;

        public String getCertFile() {
            return certFile;
        }

        public void setCertFile(String certFile) {
            this.certFile = certFile;
        }

        public String getCertPassword() {
            return certPassword;
        }

        public void setCertPassword(String certPassword) {
            this.certPassword = certPassword;
        }
    }

    public class XiaomiConfig {

        private String appId;

        private String appKey;

        private String appSecret;

        public String getAppId() {
            return appId;
        }

        public void setAppId(String appId) {
            this.appId = appId;
        }

        public String getAppKey() {
            return appKey;
        }

        public void setAppKey(String appKey) {
            this.appKey = appKey;
        }

        public String getAppSecret() {
            return appSecret;
        }

        public void setAppSecret(String appSecret) {
            this.appSecret = appSecret;
        }
    }

    public class VivoConfig {

        private String appId;

        private String appKey;

        private String appSecret;

        public String getAppSecret() {
            return appSecret;
        }

        public void setAppSecret(String appSecret) {
            this.appSecret = appSecret;
        }

        public String getAppId() {
            return appId;
        }

        public void setAppId(String appId) {
            this.appId = appId;
        }

        public String getAppKey() {
            return appKey;
        }

        public void setAppKey(String appKey) {
            this.appKey = appKey;
        }
    }


    public class OppoConfig {

        private String appKey;

        private String masterSecret;

        public String getAppKey() {
            return appKey;
        }

        public void setAppKey(String appKey) {
            this.appKey = appKey;
        }

        public String getMasterSecret() {
            return masterSecret;
        }

        public void setMasterSecret(String masterSecret) {
            this.masterSecret = masterSecret;
        }
    }

    public class HuaweiConfig {

        private String clientId;

        private String clientSecret;

        private String grantType;

        public String getClientId() {
            return clientId;
        }

        public void setClientId(String clientId) {
            this.clientId = clientId;
        }

        public String getClientSecret() {
            return clientSecret;
        }

        public void setClientSecret(String clientSecret) {
            this.clientSecret = clientSecret;
        }

        public String getGrantType() {
            return grantType;
        }

        public void setGrantType(String grantType) {
            this.grantType = grantType;
        }
    }
}
